<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;


Route::get('dotest', 'TestController@dotest');

//不需要登陆
Route::post('login/dologin', 'Login\LoginController@dologin');

//需登录
Route::group([
    'prefix' => '',
    'middleware' => ['adminislogin']
], function ($router) {

    Route::post('login/dologinout', 'Login\LoginController@dologinout');
    Route::post('login/changepassword', 'Login\LoginController@changepassword');

    Route::group([
        'prefix' => 'common'
    ], function ($router) {
        Route::post('uploadtooss', 'Common\CommonController@uploadtooss');
        Route::post('uploadfiletolocal', 'Common\CommonController@uploadfiletolocal');
        Route::post('getregion', 'Common\CommonController@getregion');
        Route::post('getmenulist', 'Common\CommonController@getmenulist');
        Route::post('getindexdata', 'Common\DataController@getindexdata');
    });
    Route::group([
        'prefix' => 'notice'
    ], function ($router) {
        Route::post('getlist', 'Common\NoticeController@getlist');
        Route::post('getinfo', 'Common\NoticeController@getinfo');
        Route::post('dopostadd', 'Common\NoticeController@dopostadd');
        Route::post('dopostedit', 'Common\NoticeController@dopostedit');
        Route::post('dosend', 'Common\NoticeController@dosend');
        Route::post('dodel', 'Common\NoticeController@dodel');
    });
    Route::group([
        'prefix' => 'question'
    ], function ($router) {
        Route::post('getlist', 'Common\QuestionController@getlist');
        Route::post('getinfo', 'Common\QuestionController@getinfo');
        Route::post('dopostadd', 'Common\QuestionController@dopostadd');
        Route::post('dopostedit', 'Common\QuestionController@dopostedit');
        Route::post('dosend', 'Common\QuestionController@dosend');
        Route::post('dodel', 'Common\QuestionController@dodel');
    });
    Route::group([
        'prefix' => 'swimg'
    ], function ($router) {
        Route::post('getlist', 'Common\SwimgController@getlist');
        Route::post('dopostadd', 'Common\SwimgController@dopostadd');
        Route::post('dodel', 'Common\SwimgController@dodel');
    });

    Route::group([
        'prefix' => 'video'
    ], function ($router) {
        Route::post('getlist', 'Common\VideoController@getlist');
        Route::post('getinfo', 'Common\VideoController@getinfo');
        Route::post('dopostadd', 'Common\VideoController@dopostadd');
        Route::post('dodel', 'Common\VideoController@dodel');
    });

    Route::group([
        'prefix' => 'adminpaytype'
    ], function ($router) {
        Route::post('getlist', 'AdminPaytype\AdminPaytypeController@getlist');
        Route::post('getinfo', 'AdminPaytype\AdminPaytypeController@getinfo');
        Route::post('dopostadd', 'AdminPaytype\AdminPaytypeController@dopostadd');
        Route::post('dopostedit', 'AdminPaytype\AdminPaytypeController@dopostedit');
        Route::post('payTypeDel', 'AdminPaytype\AdminPaytypeController@payTypeDel');
    });

    Route::group([
        'prefix' => 'adminuser'
    ], function ($router) {
        Route::post('getoplist', 'AdminUser\AdminUserController@getoplist');
        Route::post('getopinfo', 'AdminUser\AdminUserController@getopinfo');
        Route::post('getinfo', 'AdminUser\AdminUserController@getinfo');
        Route::post('editinfo', 'AdminUser\AdminUserController@editinfo');
        Route::post('dopost', 'AdminUser\AdminUserController@dopost');
        Route::post('changestatus', 'AdminUser\AdminUserController@changestatus');
        Route::post('resetpassword', 'AdminUser\AdminUserController@resetpassword');
        Route::post('getruleinfo', 'AdminUser\AdminUserController@getruleinfo');
        Route::post('dopostrule', 'AdminUser\AdminUserController@dopostrule');
    });

    Route::group([
        'prefix' => 'company'
    ], function ($router) {
        Route::post('getlist', 'Account\CompanyController@getlist');
        Route::post('getinfo', 'Account\CompanyController@getinfo');
        Route::post('dopostadd', 'Account\CompanyController@dopostadd');
        Route::post('dopostedit', 'Account\CompanyController@dopostedit');
        Route::post('resetpassword', 'Account\CompanyController@resetpassword');
        Route::post('doauditsuccess', 'Account\CompanyController@doauditsuccess');
        Route::post('doauditcancel', 'Account\CompanyController@doauditcancel');
        Route::post('doexport', 'Account\CompanyController@doexport');
        Route::post('dodel', 'Account\CompanyController@dodel');
    });
    Route::group([
        'prefix' => 'store'
    ], function ($router) {
        Route::post('getlist', 'Account\StoreController@getlist');
        Route::post('getinfo', 'Account\StoreController@getinfo');
        Route::post('dopostadd', 'Account\StoreController@dopostadd');
        Route::post('dopostedit', 'Account\StoreController@dopostedit');
        Route::post('docontractinfo', 'Account\StoreController@docontractinfo');
        Route::post('doauditsuccess', 'Account\StoreController@doauditsuccess');
        Route::post('doauditcancel', 'Account\StoreController@doauditcancel');
        Route::post('changestorecompany', 'Account\StoreController@changestorecompany'); //未完成
        Route::post('doexport', 'Account\StoreController@doexport');

        Route::post('docontractauditsuccess', 'Account\StoreController@docontractauditsuccess');
        Route::post('docontractauditcancel', 'Account\StoreController@docontractauditcancel');
        Route::post('dodel', 'Account\StoreController@dodel');
        Route::post('doexportwithcontractaudit', 'Account\StoreController@doexportwithcontractaudit');

        Route::post('docontractadd', 'Account\StoreContractController@docontractadd');
        Route::post('docontractaudit', 'Account\StoreContractController@docontractaudit');
        Route::post('getcontractlist', 'Account\StoreContractController@getcontractlist');
        Route::post('docontractmigration', 'Account\StoreContractController@docontractmigration');

    });

    Route::group([
        'prefix' => 'storefee'
    ], function ($router) {
        Route::post('getlist', 'Account\StoreFeeController@getlist');
        Route::post('getinfo', 'Account\StoreFeeController@getinfo');
        Route::post('confirmfee', 'Account\StoreFeeController@confirmfee');
        Route::post('doexport', 'Account\StoreFeeController@doexport');
    });

    Route::group([
        'prefix' => 'businessmem'
    ], function ($router) {
        Route::post('getlist', 'Common\BusinessMemController@getlist');
        Route::post('getinfo', 'Common\BusinessMemController@getinfo');
        Route::post('dopostadd', 'Common\BusinessMemController@dopostadd');
        Route::post('dopostedit', 'Common\BusinessMemController@dopostedit');
    });

    Route::group([
        'prefix' => 'customerservicemem'
    ], function ($router) {
        Route::post('getlist', 'Common\CustomerServiceMemController@getlist');
        Route::post('getinfo', 'Common\CustomerServiceMemController@getinfo');
        Route::post('dopostadd', 'Common\CustomerServiceMemController@dopostadd');
        Route::post('dopostedit', 'Common\CustomerServiceMemController@dopostedit');
    });

    Route::group([
        'prefix' => 'brand'
    ], function ($router) {
        Route::post('getlist', 'Common\BrandController@getlist');
        Route::post('getinfo', 'Common\BrandController@getinfo');
        Route::post('dopostadd', 'Common\BrandController@dopostadd');
        Route::post('dopostedit', 'Common\BrandController@dopostedit');
    });

    Route::group([
        'prefix' => 'financial'
    ], function ($router) {
        Route::group([
            'prefix' => 'liabilities'
        ], function ($router) {
            Route::post('getone', 'Financial\FinancialLiabilitiesController@getone');
            Route::post('dopostadd', 'Financial\FinancialLiabilitiesController@dopostadd');
            Route::post('doexport', 'Financial\FinancialLiabilitiesController@doexport');
        });

        Route::group([
            'prefix' => 'subject'
        ], function ($router) {
            Route::post('getlist', 'Financial\FinancialSubjectController@getlist');
            Route::post('dopostadd', 'Financial\FinancialSubjectController@dopostadd');
            Route::post('dopostedit', 'Financial\FinancialSubjectController@dopostedit');
            Route::post('dopostdel', 'Financial\FinancialSubjectController@dopostdel');
            Route::post('doexport', 'Financial\FinancialSubjectController@doexport');
        });
        Route::group([
            'prefix' => 'rate'
        ], function ($router) {
            Route::post('dopostadd', 'Financial\FinancialRateController@dopostadd');
            Route::post('getlist', 'Financial\FinancialRateController@getlist');
            Route::post('getinfo', 'Financial\FinancialRateController@getinfo');
            Route::post('dopostedit', 'Financial\FinancialRateController@dopostedit');
            Route::post('dopostdel', 'Financial\FinancialRateController@dopostdel');
            Route::post('doexport', 'Financial\FinancialRateController@doexport');
        });

        Route::group([
            'prefix' => 'moneylog'
        ], function ($router) {
            Route::post('dopostadd', 'Financial\FinancialMoneylogController@dopostadd');
            Route::post('getlist', 'Financial\FinancialMoneylogController@getlist');
            Route::post('getinfo', 'Financial\FinancialMoneylogController@getinfo');
            Route::post('dopostedit', 'Financial\FinancialMoneylogController@dopostedit');
            Route::post('dopostdel', 'Financial\FinancialMoneylogController@dopostdel');
            Route::post('doexport', 'Financial\FinancialMoneylogController@doexport');
            Route::post('getlastmoneylog', 'Financial\FinancialMoneylogController@getlastmoneylog');
            Route::post('getmoneylogcountbyday', 'Financial\FinancialMoneylogController@getmoneylogcountbyday');
            Route::post('updateMoneyLog', 'Financial\FinancialMoneylogController@updateMoneyLog');
        });

        Route::group([
            'prefix' => 'profit'
        ], function ($router) {
            Route::post('getsearchdata', 'Financial\FinancialProfitController@getsearchdata');
            Route::post('getinfo', 'Financial\FinancialProfitController@getinfo');
            Route::post('saveinfo', 'Financial\FinancialProfitController@saveinfo');

        });
    });
});
